<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <div v-demo:foo.a.b="message"></div>
    </div>
    <script src="./node_modules/vue/dist/vue.js"></script>
    <script>
        // 
        Vue.directive("demo",{
            // bind
            bind:function(el,binding,vnode,oldVnode){
                var str=JSON.stringify;
                console.log(str);// ƒ stringify() { [native code] }

                el.innerHTML=
                    "name:"+str(binding.name)+"<br>"+// name
                    "value:"+str(binding.value)+"<br>"+// undefined
                    "expression:"+str(binding.expression)+"<br>"+// message
                    "argument:"+str(binding.arg)+"<br>"+// foo
                    "modifiers:"+str(binding.modifiers)+"<br>"+// {"a":true,"b":true}
                    "vnode:"+str(binding.vnode)+"<br>"+// undefined
                    "vonde keys"+Object.keys(vnode).join(",")

            },

        });
        
        
        
        let vm=new Vue({
            el:"#app",
            data:{
                msg:"hhh"
            }

        })



    </script>
</body>
</html>